home *** CD-ROM | disk | FTP | other *** search
- #!/usr/bin/perl
- $= = 999999;
- $first = 1;
- while (<>) {
- chop;
- if (m=^/=) { # pathname -- starts new entry
- if (!$first) {
- $arr{$pathname} = $comment;
- }
- $pathname = $_;
- $first = 0;
- undef($comment);
- }
- elsif (/^\s*$/) { # blank line
- next; # skip it
- }
- elsif (/^\s*\d+\s+\d+\/\d+\/\d+\s+[\w\d]+/) { # Infoline
- next; # skip it
- }
- else {
- m/^\s*(\S.*)\s*$/; # take only good stuff
- $comment = "$comment $1"; # append to comment
- }
-
- }
- @keys = keys(%arr);
- @keys = sort(@keys);
- foreach $key (@keys) {
- $key =~ m=^(/.+/)([\w\.]+)\s*$=; # find line components
- $path = $1;
- $filename = $2;
- $comment = $arr{$key};
- $comment =~ s/^\s*//;
- write; # print line components
- }
- format STDOUT_TOP =
- ascii
- .
- format STDOUT =
- cd ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<~
- $path
- get ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<~
- $filename
- .
- # end of perl script
-